﻿function PostConsultant()
{
    var modelId = $("#ModelId").val();
    var contentId = $("#ContentId").val();
    var name = $("#ConsultantName").val();
    var content = $("#ConsultantContent").val();

    var parameters = "ModelId=" + modelId;
    parameters += "&ContentId=" + contentId;
    parameters += "&Name=" + escape(name);
    parameters += "&Content=" + escape(content);

    $.ajax({
        type: "POST",
        url: "../../AjaxPostBack.ashx?Action=PostConsultant",
        data: parameters,
        beforeSend: function () { },
        success: function (msg)
        {
            switch (msg)
            {
                case "1":
                    alert("发送成功。");

                    window.location = window.location;
                    break;

                default:
                    alert(msg);
                    break;
            }
        }
    });


}